<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>修改会员资料</title>
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css">
<!--公共样式结束-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/module_form.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_memberAdd.css">
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.min.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.timer.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/common.js"></script>
</head>

<body>
	<div class="page_wraper">
		<div id="tab1_0" style="padding-left: 10px;">
		<form id="form_ele">
			<input name="id" type="hidden" value="{$detail.id}" />
			<table cellpadding="0" cellspacing="0" class="module_form">
				<tr>
					<td class="ele_title"><label for="title">请选择上级分类：<em>*</em></label></td>
					<td class="ele_content">
						<eq name="title" value="0">暂无上级分类
						<else />{$title.title}（{$title.entitle}）
						</eq>
					</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="title">菜品分类中文名称：<em>*</em></label></td>
					<td class="ele_content">
						<input name="title" type="text" value="{$detail.title}" class="form_ele_text width_200">
					</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="entitle">菜品分类英文名称：<em>*</em></label></td>
					<td class="ele_content">
						<input name="entitle" type="text" value="{$detail.entitle}" class="form_ele_text width_200">
					</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="entitle">有无子类：<em>*</em></label></td>
					<td class="ele_content">
						<eq name="detail.issub" value="1" >
							<input name="issub" type="radio" value="1" checked >有 &nbsp;&nbsp;
							<input name="issub" type="radio" value="0"> 无
						<else />
							<input name="issub" type="radio" value="1" >有 &nbsp;&nbsp;
							<input name="issub" type="radio" value="0" checked > 无
						</eq>
						
					</td>
				</tr>
				<tr>
					<td class="ele_title"><label for="entitle">排序号：<em>*</em></label></td>
					<td class="ele_content">
						<input name="sort" value="{$detail.sort}" type="text" class="form_ele_text width_200">
					</td>
				</tr>
			</table>
		</form>
		</div>
	</div>
	<div class="page_footer pdtd10">
		<input type="button" name="submit" value="提交数据"  class="form_ele_submit"/>
		<input type="reset" name="reset" value="清空数据"  class="form_ele_reset"/>
	</div>
</body>
<script type="text/javascript">
	//弹出窗口全局变量
	var api = frameElement.api, W = api.opener;

	$(function(){
		//重置
		$('.form_ele_reset').on('click',function(){
			$('#memberAdd_form').get(0).reset();
		});
		
		//提交
		$('.form_ele_submit').on('click',function(){
			
			var tipsObj = windowApi.lhgdialog.tips('正在提交数据...',10,etIcon.loading);
			
			//通过Ajax提交表单
			var postData = {};
			postData = $("#form_ele").serialize();
			$.post("{:U('Product/sortEdit')}", postData , function(data){
				
				if(data.status==1){
					windowApi.lhgdialog.tips('数据提交成功！');
					var obj = windowApi.lhgdialog.list['Product_sort'];
					//obj.reload(obj);
					frameApi.close(); //关闭当前窗口
				}else{
					windowApi.lhgdialog.alert(data.info);
				}
			}, "json");
			
		});
	});
</script>
</html>
